<template>
  <!-- 输入框样式 -->
  <div id='i-input'>
    <div class="van-hairline--surround">
      <van-field v-model="inputContent"
                 center
                 clearable
                 label=""
                 placeholder="请输出聊天信息">
        <template #button>
          <van-button @click="send"
                      size="small"
                      type="primary"
                      style="
      backgroundColor:#72CACD;border:none">发送</van-button>
        </template>
      </van-field>
    </div>
  </div>
</template>

<script>
export default {
  props: ['sendchat'],
  data () {
    return {
      inputContent: ''
    }
  },
  methods: {
    send: function () {
      // this.sendcurrent('小黑', this.inputContent)
      this.sendchat(this.inputContent)
      this.inputContent = ''
    }
  }
}
</script>

<style scoped>
#i-input {
  position: absolute;
  bottom: 0px;
  padding: 0px;
  width: 100%;
}
</style>
